package com.colde.salary.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.colde.salary.dao.BaseMapper;
import com.colde.salary.model.User;
import com.colde.salary.poi.entity.UserEnity;

public interface UserMapper extends BaseMapper<User>{

	@Select("<script>"
			+"SELECT * FROM TB_USER WHERE  1 = 1"
			+ "<if test= \"role != null and role != ''\"> and role = #{role} </if>"
			+ "ORDER BY UPDATETIME DESC"
			+ "</script>")
	List<User> findList (@Param("role") String role);
	
	@Select("<script>"
			+"SELECT * FROM TB_USER WHERE  1 = 1"
			+ "<if test= \"role != null and role != ''\"> and role = #{role} </if>"
			+ "ORDER BY UPDATETIME DESC"
			+ "</script>")
	List<UserEnity> findUserEnityList (@Param("role") String role);
}
